<?php

/**
 * IndexController - The default controller class
 * 
 * @author
 * @version 
 */

require_once 'Zend/Controller/Action.php';

class Adminb_SummaryController extends App_Zend_Controller_Action_Adminb 
{
	

	
	public function init(){
		
		parent::init();
		
	}
	
	public function preDispatch()
	{
		
		$this->getHelper ('layout')->setLayout('framelayout');
		
		$this->view->addHelperPath(MY_ROOT.'/vhelpers');
		
		Zend_Controller_Action_HelperBroker::addPath(MY_ROOT.'/chelpers');
		
		$member=new CMember();
		
		if(!$member->isUser($this->_request->getModuleName(),$this->_request->getControllerName())){
			
			$this->_redirect(MY_URL.'/administrator-auth-login');
			
			return false;
			
		}
		
		return true;
		
	}
	


	
    public function indexAction() 
    { 	
	
    	$item=new CItem();
		
		$bulletinArray=$item->getAllItems(0,6,'bulletin');
		
		$this->view->assign('bulletinArray',$bulletinArray);
		
		$order=new COrder();
		
		$where=R_PRE."orders.uid='".$_COOKIE[COOKIE_PRE.'uid']."'";
		
		$orderArray=$order->getAllOrders(0,6,0,$where);
		
		$this->view->assign('orderArray',$orderArray);

    }
	
	public function postAction(){
	
		//$this->_helper->viewRenderer->setNoRender();
		
		//$this->getHelper ('layout')->disableLayout ();
	
	}
    

    
}
